import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '头像',
    align: "center",
    dataIndex: 'profilePicture',
    customRender: render.renderImage,
  },
  {
    title: '客户名称',
    align: "center",
    dataIndex: 'customerName'
  },
  {
    title: '公司名称',
    align: "center",
    dataIndex: 'companyName'
  },
  {
    title: '会员等级',
    align: "center",
    dataIndex: 'membershipLevel_dictText'
  },
  {
    title: '客户级别',
    align: "center",
    dataIndex: 'customerLevel_dictText'
  },
  {
    title: '客户标签',
    align: "center",
    dataIndex: 'customerLabel_dictText'
  },
  {
    title: '账户余额',
    align: "center",
    dataIndex: 'accountBalance'
  },
  {
    title: '累计消费',
    align: "center",
    dataIndex: 'accumulatedConsumption'
  },
  {
    title: '代金券',
    align: "center",
    dataIndex: 'voucher'
  },
  {
    title: '业务人员',
    align: "center",
    dataIndex: 'businessPersonnel_dictText'
  },
  {
    title: '客服人员',
    align: "center",
    dataIndex: 'customerServicePersonnel_dictText'
  },
  {
    title: '账户类型',
    align: "center",
    dataIndex: 'accountType_dictText'
  },
  {
    title: '项目数',
    align: "center",
    dataIndex: 'item'
  },
  {
    title: '电子邮箱',
    align: "center",
    dataIndex: 'email'
  },
  {
    title: '最后交易',
    align: "center",
    dataIndex: 'finalTransaction'
  },
  {
    title: '微信名称',
    align: "center",
    dataIndex: 'wechatName'
  },
  {
    title: '电话号码',
    align: "center",
    dataIndex: 'phoneNumber'
  },
  {
    title: '微信账号',
    align: "center",
    dataIndex: 'wechatAccount'
  },
  {
    title: '公司地址',
    align: "center",
    dataIndex: 'companyAddress'
  },
  {
    title: '备注',
    align: "center",
    dataIndex: 'remark'
  },
];

// 高级查询数据
export const superQuerySchema = {
  profilePicture: {title: '头像',order: 0,view: 'image', type: 'string',},
  customerName: {title: '客户名称',order: 1,view: 'text', type: 'string',},
  companyName: {title: '公司名称',order: 2,view: 'text', type: 'string',},
  membershipLevel: {title: '会员等级',order: 3,view: 'number', type: 'number',dictCode: 'membership_level',},
  customerLevel: {title: '客户级别',order: 4,view: 'number', type: 'number',dictCode: 'customer_level',},
  customerLabel: {title: '客户标签',order: 5,view: 'number', type: 'number',dictCode: 'customer_label',},
  accountBalance: {title: '账户余额',order: 6,view: 'number', type: 'number',},
  accumulatedConsumption: {title: '累计消费',order: 7,view: 'number', type: 'number',},
  voucher: {title: '代金券',order: 8,view: 'number', type: 'number',},
  businessPersonnel: {title: '业务人员',order: 9,view: 'sel_search', type: 'string',dictCode: '',},
  customerServicePersonnel: {title: '客服人员',order: 10,view: 'sel_search', type: 'string',dictCode: '',},
  accountType: {title: '账户类型',order: 11,view: 'number', type: 'number',dictCode: 'account_type',},
  item: {title: '项目数',order: 12,view: 'number', type: 'number',},
  email: {title: '电子邮箱',order: 13,view: 'text', type: 'string',},
  finalTransaction: {title: '最后交易',order: 14,view: 'datetime', type: 'string',},
  wechatName: {title: '微信名称',order: 15,view: 'text', type: 'string',},
  phoneNumber: {title: '电话号码',order: 16,view: 'text', type: 'string',},
  wechatAccount: {title: '微信账号',order: 17,view: 'text', type: 'string',},
  companyAddress: {title: '公司地址',order: 18,view: 'textarea', type: 'string',},
  remark: {title: '备注',order: 19,view: 'textarea', type: 'string',},
};
